
def enumerate_demo():
    a = [1, 2, 3, 4, 5, 6]
    b = [6, 5, 4, 3, 2, 1]

    a_iter = iter(a)
    b_iter = enumerate(a_iter)

    for v in b_iter:
        print(v, end=" ")  # (0, 1) (1, 2) (2, 3) (3, 4) (4, 5) (5, 6)

    print("\r")
    c = zip(a, b)
    for v in c:
        print(v, end=" ")
    print("\r")  # (1, 6) (2, 5) (3, 4) (4, 3) (5, 2) (6, 1)


if __name__ == '__main__':
    enumerate_demo()
